<?php

namespace common\models\shop;

use common\models\Common;

/**
 * 消息模板
 * Class MessageTemplate
 * @package common\models
 */
class GoodsOrderDetail extends Common
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%goods_order_detail}}';
    }

    public function getGoodsDetail() {
        return $this->hasOne(GoodsDetail::className(), ['id' => 'goods_detail_id']);
    }

    public function getGoods() {
        return $this->hasOne(Goods::className(), ['id' => 'goods_id']);
    }

    public function getOrder() {
        return $this->hasOne(GoodsOrder::className(), ['order_number' => 'order_number']);
    }

}


